package com.qiuzhiyi.net;

import com.qiuzhiyi.item.AboutUsItem;
import com.qiuzhiyi.item.AgentItem;
import com.qiuzhiyi.item.AllowanceItem;
import com.qiuzhiyi.item.BannerItem;
import com.qiuzhiyi.item.BaseItem;
import com.qiuzhiyi.item.FeeHistoryItem;
import com.qiuzhiyi.item.HumanItem;
import com.qiuzhiyi.item.MsgListItem;
import com.qiuzhiyi.item.MsgTypeItem;
import com.qiuzhiyi.item.ShopItem;
import com.qiuzhiyi.item.ZhaoGongDetailItem;
import com.qiuzhiyi.item.ZhaoGongItem;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Author: Li
 * Date: 2017/12/11 0011
 * Description:
 */

public interface HttpService {
    //账号密码登录
    @FormUrlEncoded
    @POST(HttpUrl.URL_LOGIN_PWD)
    Observable<BaseItem<HumanItem>> loginWithPwd(@FieldMap Map<String, String> map);

    //账号密码登录
    @FormUrlEncoded
    @POST(HttpUrl.URL_LOGIN_PWD)
    Observable<String> test(@FieldMap Map<String, String> map);

    //注册
    @FormUrlEncoded
    @POST(HttpUrl.URL_REGISTER)
    Observable<BaseItem<HumanItem>> register(@FieldMap Map<String, String> map);

    //查看个人信息
    @GET(HttpUrl.URL_PERSONAL_INFO)
    Observable<BaseItem<HumanItem>> showHumanInfo(@Query("humanId") String uid);

    //更改个人信息
    @FormUrlEncoded
    @POST(HttpUrl.URL_UPDATE_PERSONAL_INFO)
    Observable<BaseItem<HumanItem>> updateHumanInfo(@FieldMap Map<String, String> map);

    //上传图片
    @FormUrlEncoded
    @POST(HttpUrl.URL_UPLOAD_PIC)
    Observable<BaseItem<HumanItem>> updateHumanPic(@FieldMap Map<String,String> map);

    //修改密码
    @FormUrlEncoded
    @POST(HttpUrl.URL_UPDATE_PWD)
    Observable<BaseItem<HumanItem>> updatePwd(@FieldMap Map<String,String> map);

    //今日招工列表
    @FormUrlEncoded
    @POST(HttpUrl.URL_ZHAOGONG_LIST)
    Observable<BaseItem<ZhaoGongItem>> showZhaogongList(@FieldMap Map<String,String> map);

    //招工详情
    @FormUrlEncoded
    @POST(HttpUrl.URL_ZHAOGONG_DETAIL)
    Observable<BaseItem<ZhaoGongDetailItem>> showZhaogongDetail(@FieldMap Map<String,String> map);

    //获取消息类型
    @GET(HttpUrl.URL_GET_MSG_TYPE)
    Observable<BaseItem<List<MsgTypeItem>>> getMsgType();

    //获取消息列表
    @FormUrlEncoded
    @POST(HttpUrl.URL_GET_MSG_LIST)
    Observable<BaseItem<List<MsgListItem>>> getMsgList(@FieldMap Map<String,String> map);

    //获取消息详情
    @FormUrlEncoded
    @POST(HttpUrl.URL_GET_MSG_DETAIL)
    Observable<BaseItem<MsgListItem>> getMsgDetail(@FieldMap Map<String,String> map);

    //报名
    @FormUrlEncoded
    @POST(HttpUrl.URL_SIGN_UP)
    Observable<String> signUp(@FieldMap Map<String,String> map);

    //获取经纪人列表
    @FormUrlEncoded
    @POST(HttpUrl.URL_GET_AGENT_LIST)
    Observable<BaseItem<AgentItem>> getAgentList(@FieldMap Map<String,String> map);

    //获取门店列表
    @GET(HttpUrl.URL_STORE_LIST)
    Observable<BaseItem<List<ShopItem>>> getShopList();

    //获取返费.补贴列表
    @FormUrlEncoded
    @POST(HttpUrl.URL_FEE_LIST)
    Observable<BaseItem<AllowanceItem>> getFeeList(@FieldMap Map<String,String> map);

    //获取关于我们
    @GET(HttpUrl.URL_ABOUT_US)
    Observable<BaseItem<AboutUsItem>> getAboutUsInfo();

    //上传提问图片
    @FormUrlEncoded
    @POST(HttpUrl.URL_UPLOAD_QUIZ_PIC)
    Observable<String> uploadQuizPic(@FieldMap Map<String,String> map);

    //提交提问
    @FormUrlEncoded
    @POST(HttpUrl.URL_QUIZ)
    Observable<String> quiz(@FieldMap Map<String,String> map);

    //查询提问列表
    @FormUrlEncoded
    @POST(HttpUrl.URL_QUIZ_LIST)
    Observable<String> getQuizList(@FieldMap Map<String,String> map);

    //获取门店详情
    @FormUrlEncoded
    @POST(HttpUrl.URL_STORE_DETAIL)
    Observable<String> getStoreInfo(@FieldMap Map<String,String> map);

    //获取轮播图
    @GET(HttpUrl.URL_BANNER)
    Observable<BaseItem<List<BannerItem>>> getBanner();

    //推荐
    @FormUrlEncoded
    @POST(HttpUrl.URL_RECOMMEND)
    Observable<String> recommend(@FieldMap Map<String,String> map);

    //获取历史费用
    @FormUrlEncoded
    @POST(HttpUrl.URL_FEE_HISTORY)
    Observable<BaseItem<List<FeeHistoryItem>>> getFeeHistory(@FieldMap Map<String,String> map);
}
